<template>
    <s-modal :visible="visible" title="任务详情" @ok="save()" width="70%" wrapClassName="full-modal"
        @cancel="() => { if (!confirmLoading) { visible = false } }" :confirm-loading="confirmLoading"
        :closable="!confirmLoading" :footer="null" style="margin-top: -30px;">
        <div class="gunD">
            <div class="renwu">
                <div class="renwu-name">任务名称</div>
                <div class="renwu-info">
                    <div>下发时间</div>
                    <div>处置部门</div>
                    <div>状态</div>
                    <div>已反馈</div>
                </div>
            </div>
            <div class="navOne">
                <div class="navTwo">
                    <div class="btn" :class="{ active: itemIndex == 1 }" @click="btnClick(1)">反馈情况</div>
                    <div class="btn" :class="{ active: itemIndex == 2 }" @click="btnClick(2)">事项流转</div>
                </div>
            </div>


            <!-- 任务详情 -->
            <div v-if="itemIndex == 1">
                <div class="nav">
                    <img src="@/assets/imgSrc/bz.png" alt="">
                    <span>新建任务</span>
                </div>
                <div class="navCenter">
                    <div class="nav-initiateUnits">
                        <div>
                            发起单位：治安支队办公室
                        </div>
                        <div>
                            发起时间：2022年8月31日 14:31:45
                        </div>
                        <a-form-item label="联系人">
                            <a-input placeholder="请选择联系人" disabled />
                        </a-form-item>
                        <a-form-item label="联系方式：">
                            <a-input placeholder="请输入联系人手机号" disabled />
                        </a-form-item>
                    </div>
                </div>

                <div class="nav">
                    <img src="@/assets/imgSrc/bz.png" alt="">
                    <span>发起单位</span>
                </div>

                <div class="nav-name">
                    <div>任务编号：</div>
                    <a-form-item label="任务名称：">
                        <a-input placeholder="请输入案件名称(限25字)" />
                    </a-form-item>
                </div>
                <div class='nav-info'>
                    <a-form-item label="任务详情: ">
                        <a-textarea placeholder="请输入事项详情" disabled />
                    </a-form-item>
                </div>
                <div class="nav-fuJian">
                    <div>添加附件:</div>
                    <div class="table">
                        <div class="table-title">
                            <div>文件名</div>
                            <div>操作</div>
                        </div>
                        <div class="table-tbody">
                            <div>
                                <div class="addUpLoadText">11111111111111111111111111111111111111111111</div>
                            </div>
                            <div class="addCz">
                                <span class="icon-xiazai">下载</span>
                                <span class="icon-shanchu2">删除</span>
                            </div>
                        </div>
                        <div class="table-tbody">
                            <div class="addUpLoad">
                                <span class="icon-jiahao">点击上传文件</span>
                            </div>
                            <div class="addCz">
                                <span class="icon-xiazai">下载</span>
                                <span class="icon-shanchu2">删除</span>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- 任务处置要求 -->
                <div class="nav">
                    <img src="@/assets/imgSrc/bz.png" alt="">
                    <span>任务处理要求</span>
                </div>
                <div class="navCenter">
                    <div class="nav-receivingUnit">
                        <a-form-item label="接收单位：">
                            <a-input placeholder="请选择接收单位" disabled />
                        </a-form-item>
                        <a-form-item label="限时反馈">
                            <a-input placeholder="请选择限时反馈时间" disabled />
                        </a-form-item>
                        <a-form-item label="紧急程度">
                            <a-input placeholder="短信通知" disabled />
                        </a-form-item>
                        <a-form-item label="短信通知">
                            <a-input placeholder="短信通知" disabled />
                        </a-form-item>
                    </div>
                    <div class="nav-info">
                        <a-form-item label="备注: ">
                            <a-textarea placeholder="请输入备注" disabled />
                        </a-form-item>
                    </div>
                </div>


                <div class="btn">
                    <a-button>取消</a-button>
                    <a-button type="primary">保存</a-button>
                    <a-button type="primary">发起</a-button>
                </div>
            </div>
            <div v-if="itemIndex == 2">

                <a-form-item label="接收单位：">
                    <a-select placeholder="请选择接收单位">
                        <a-select-option value="">Zone one</a-select-option>
                        <a-select-option value="">Zone two</a-select-option>
                    </a-select>
                </a-form-item>
                <div class="nav-fuJian">
                    <div>添加附件:</div>
                    <div class="table" style="width: 800px">
                        <div class="table-title">
                            <div>流转状态</div>
                            <div>操作时间</div>
                            <div>操作人</div>
                            <div>处置结果</div>
                        </div>
                        <div class="table-tbody">
                            <div>
                                <div class="addUpLoadText">11111111111111111111111111111111111111111111</div>
                            </div>
                            <div>
                                <div class="addUpLoadText">11111111111111111111111111111111111111111111</div>
                            </div>
                            <div>
                                <div class="addUpLoadText">11111111111111111111111111111111111111111111</div>
                            </div>
                            <div>
                                <div class="addUpLoadText">11111111111111111111111111111111111111111111</div>
                            </div>

                        </div>
                        <!-- <div class="table-tbody">
                            <div class="addUpLoad">
                                <span class="icon-jiahao">点击上传文件</span>
                            </div>
                            <div class="addCz">
                                <span class="icon-xiazai">下载</span>
                                <span class="icon-shanchu2">删除</span>
                            </div>
                        </div> -->
                    </div>
                </div>
            </div>
        </div>


    </s-modal>
</template>
  
<script>

export default {
    name: 'Add',
    emits: ['change'],
    data() {
        return {
            itemIndex: 1,
            confirmLoading: false,
            visible: false,
            users: [
                { id: 1, name: "John Doe", email: "johndoe@example.com" },
            ],

        }
    },
    methods: {
        open() {
            this.visible = true
        },
        btnClick(index) {
            this.itemIndex = index
        },
    }
}
</script>
  
<style lang="less" scoped>
.renwu {
    padding: 10px 30px 30px 30px;

    .renwu-name {}

    .renwu-info {
        display: flex;
        padding-top: 20px;

        div {
            padding-right: 200px;
        }
    }
}

.navOne {
    display: flex;
    // align-items: center;
    justify-content: center;
    padding: 0 0 30px 0;

    .navTwo {
        display: flex;
        justify-content: center;
        // padding: 3px 20px;
        margin-right: 10px;
        border-radius: 20px;
        background: #9492cf;
    }

    .btn {
        font-size: 16px;
        // font-weight: 600;
        padding: 10px 50px;
        color: #edf1f1;
    }
}


.active {
    color: #fff;
    text-align: center;
    background: #0045FF;
    border-radius: 20px;
}

::v-deep(.ant-modal-footer) {
    display: none !important;
    visibility: hidden !important;
}

.gunD {
    overflow: auto;
    height: 680px;
}

::-webkit-scrollbar {
    width: 0;
    height: 10px;
}

.nav {
    background-color: #F1F6FE;
    display: flex;
    align-items: center;
    margin-bottom: 40px;

    img {
        padding: 10px 10px;
    }

    span {
        color: #0F5FD7;
        padding: 10px 0px;
    }
}

.navCenter {
    padding: 0 30px 20px 30px;
}

.nav-name {
    display: flex;
    // padding: 30px 10px;

    div:nth-child(2) {
        margin-left: 300px;
    }
}

.nav-receivingUnit {
    display: flex;
    align-items: center;

    div:nth-child(2) {
        padding: 0 50px;
    }
}

.nav-info {
    display: flex;
    padding: 20px 0px;

    textarea {
        margin-left: 30px;
        width: 800px;
        height: 120px;
    }
}

.nav-fuJian {
    display: flex;
    padding-bottom: 10px;

    .table {
        margin-left: 28px;
        width: 800px;
        // text-align: center;
        border: 1px solid #D9D9D9;

        .table-title {
            display: flex;
            justify-content: space-around;
            border-bottom: 1px solid #D9D9D9;
            padding: 10px 0;
        }

        .table-tbody {
            display: flex;
            justify-content: space-around;
            border-bottom: 1px solid #D9D9D9;
            padding: 12px 0;

            .addUpLoadText {
                width: 215px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .addUpLoad {
                width: 215px;
                display: flex;
                align-items: center;
                justify-content: center;

                span {
                    background: #0F5FD7;
                    padding: 0px 15px;
                    color: #fff;
                    font-size: 14px;
                    border-radius: 20px;
                    margin-right: 10px;
                }

            }

            .addCz {
                display: flex;
                align-items: center;
                justify-content: center;

                span {
                    padding: 2px 15px;
                    font-size: 14px;
                    border-radius: 20px;
                    margin-right: 10px;
                }

                span:nth-child(1) {
                    background: #c4e0f0;
                    color: #5AB5FC;
                    border: 0.5px solid #5AB5FC
                }

                span:nth-child(2) {
                    background: #FFEEF1;
                    color: red;
                    border: 1px solid red
                }
            }
        }
    }
}

.nav-initiateUnits {
    display: flex;

    div {
        padding-right: 50px;
    }
}

.btn {
    text-align: center;
    padding-bottom: 30px;

    button {
        width: 120px;
        height: 40px;
        margin: 0 15px;
    }
}
</style>